#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    int count = 0;
    int a = 0;
    scanf("%d", &a);
    for (int i = 0; i < 32; i++)
    {
        if (a & (1 << i))
        {
            count++;
        }
    }
    printf("%d", count);
    return 0;
}












